package com.linys.scala.qf.day04_implicit

/**
  * Created by admin on 2019/10/24.
  */
object Test {

  def main(args: Array[String]): Unit = {

    val list = List(1,2,3,4,5,6,7,8,9,10)
    val res = list.aggregate((0, 0))((x, y) => (x._1 + 1, x._2 + y), (a, b)=> (a._1 + b._1, a._2 + b._2))
    println(res)
  }

}
